// 主页
var app = getApp();
Page({
	data: {
		items: []
	},
	onShow: function(){

	},
	onLoad: function () {
		this.load();
	},
	load: function() {
		var self = this;

		app.api.request('bookshelf', null , function(err, data){
			if(err){
				wx.showModal({
					title: '提示',
					content: err.message,
					showCancel: false
				});
			}else{
				self.setData({'items': data});
			}
		});
	},
	// 重置
	reset: function() {
		return this;
	}
});
